package cn.unknowpupil.init;

import cn.unknowpupil.init.components.annotation.rest.AnonymousGetMapping;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created at 2020/11/13 by w10g <br>
 * Initialize InitApplication ... <br>
 *
 * @author unknowpupil
 * @since 0.0.1
 */
@EnableAsync
@RestController
@MapperScan("cn.unknowpupil.init.mapper")
@SpringBootApplication
@EnableTransactionManagement
public class InitApplication {
    /**
     * 主入口
     * @param args
     */

    public static void main(String[] args) {
        SpringApplication.run(InitApplication.class,args);
    }

    /**
     * 访问首页提示
     *
     * @return /
     */
    @AnonymousGetMapping("/")
    public String index() {
        return "Backend service started successfully";
    }
}
